# -*- coding: utf-8 -*- 
# @project : 《Atcoder》
# @Author : created by bensonrachel on 2021/12/11
# @File : 231.B - Election.py
N = int(input())
d = dict()

for i in range(N):
    s = input()
    if s in d.keys():
        d[s] += 1
    else:
        d[s] = 1
dd = sorted(d.items(),key= lambda x : x[1])
print(dd[-1][0])